# __getattr__, __getattribute__
# __getattr__ 就是查找不到属性的时候调用
from datetime import date
class User:
    def __init__(self, name, birthday):
        self.name = name
        self.birthday = birthday

    # # 查找不到属性的时候调用
    # def __getattr__(self, item):
    #     return "not find "
    # 查找不到属性的时候调用
    def __getattr__(self, item):
        return self.Name

    def __getattribute__(self, item):
        return "bbbbb"

if __name__ == '__main__':
    user = User("bobby", date(year=1988, month=2, day=1))

    # print(user.get_age())
    # print(user.name)
    print(user.test)

